package org.example.myleet.p407;

import org.example.myleet.Utils.Assert;
import org.example.myleet.Utils.Parser;

public class Main {
    public static void main(String[] args) {
        Solution2 solution = new Solution2();
        Assert.isTrue(4 == solution.trapRainWater(Parser.parse("[[1,4,3,1,3,2],[3,2,1,3,2,4],[2,3,3,2,3,1]]")));
        Assert.isTrue(10 == solution.trapRainWater(Parser.parse("[[3,3,3,3,3],[3,2,2,2,3],[3,2,1,2,3],[3,2,2,2,3],[3,3,3,3,3]]")));
        Assert.isTrue(14 == solution.trapRainWater(Parser.parse("[[12,13,1,12],[13,4,13,12],[13,8,10,12],[12,13,12,12],[13,13,13,13]]")));
        Assert.isTrue(3 == solution.trapRainWater(Parser.parse("[[5,5,5,1],[5,1,1,5],[5,1,5,5],[5,2,5,8]]")));
        Assert.isTrue(215 == solution.trapRainWater(Parser.parse("[[9,9,9,9,9,9,8,9,9,9,9],[9,0,0,0,0,0,1,0,0,0,9],[9,0,0,0,0,0,0,0,0,0,9],[9,0,0,0,0,0,0,0,0,0,9],[9,9,9,9,9,9,9,9,9,9,9]]")));
    }
}
